<%@page import="java.beans.PropertyEditorManager"%>
<%@page import="java.beans.PropertyEditor"%>
<%@page import="java.util.*" %>
<%@page import="com.qingke.test.DatePropertyEdit" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

	<%!public void jspInit() {
		PropertyEditor editor = PropertyEditorManager.findEditor(Date.class);
		if (editor == null) {
			PropertyEditorManager.registerEditor(Date.class, DatePropertyEdit.class);
		}
	}%>


	<!-- 设置实体类的属性 -->
	<jsp:useBean id="message" class="com.qingke.bean.Message"></jsp:useBean>
	<%-- 	<jsp:setProperty name="message" value="情深缘浅" property="from"></jsp:setProperty> --%>
	<jsp:setProperty name="message" value="一生遗憾" property="to"></jsp:setProperty>
	<jsp:setProperty name="message" value="2016-09-22 11:01:10"
		property="msgDate"></jsp:setProperty>
	<jsp:setProperty name="message" value="12" property="message"></jsp:setProperty>


	<!-- 取到实体类的属性 -->
	<%-- 	<jsp:useBean id="test" class="com.pojo.Message"></jsp:useBean> --%>
	From:<jsp:getProperty property="from" name="message" />
	<br /> To:<jsp:getProperty property="to" name="message" />
	<br /> At:<jsp:getProperty property="msgDate" name="message" />
	<br /> Message:<jsp:getProperty property="message" name="message" />
	<br />

</body>
</html>